<?php 
	

	$t = time();

	//设置时间为东8区
	date_default_timezone_set("PRC");

	echo date("Y-m-d H:i:s",$t)."<br>";
	echo date("Y/m/d H:i:s",$t)."<br>";
	echo date("Y年m月d日 H:i:s",$t)."<br>";
	echo "<hr>";


	$a = "2014-11-12 11:11:11";
	echo strtotime($a);
	echo "<hr>";

	$time1 = "2017-10-30 20:47:20";
	$time2 = "2017-11-11";
	echo floor((strtotime($time2)-strtotime($time1))/(24*60*60));
	echo "<hr>";

	$start = microtime(true);
	for ($i=0; $i < 1000; $i++) { 
		# code...
	}
	$end   = microtime(true);
	echo $end-$start;

 ?>